<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    
    <title>numpy.MachAr &mdash; NumPy v1.18 Manual</title>
    
    <link rel="stylesheet" type="text/css" href="../../_static/css/spc-bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../../_static/css/spc-extend.css">
    <link rel="stylesheet" href="../../_static/scipy.css" type="text/css" >
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" >
    <link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" >
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '1.18.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  false
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../_static/language_data.js"></script>
    <script type="text/javascript" src="../../_static/js/copybutton.js"></script>
    <link rel="author" title="About these documents" href="../../about.html" >
    <link rel="index" title="Index" href="../../genindex.html" >
    <link rel="search" title="Search" href="../../search.html" >
    <link rel="top" title="NumPy v1.18 Manual" href="../../index.html" >
    <link rel="up" title="Data type routines" href="../routines.dtype.html" >
    <link rel="next" title="numpy.issctype" href="numpy.issctype.html" >
    <link rel="prev" title="numpy.iinfo" href="numpy.iinfo.html" > 
  </head>
  <body>
<div class="container">
  <div class="top-scipy-org-logo-header" style="background-color: #a2bae8;">
    <a href="../../index.html">
      <img border=0 alt="NumPy" src="../../_static/numpy_logo.png"></a>
    </div>
  </div>
</div>


    <div class="container">
      <div class="main">
        
	<div class="row-fluid">
	  <div class="span12">
	    <div class="spc-navbar">
              
    <ul class="nav nav-pills pull-left">
        <li class="active"><a href="https://numpy.org/">NumPy.org</a></li>
        <li class="active"><a href="https://numpy.org/doc">Docs</a></li>
        
        <li class="active"><a href="../../index.html">NumPy v1.18 Manual</a></li>
        

          <li class="active"><a href="../index.html" >NumPy Reference</a></li>
          <li class="active"><a href="../routines.html" >Routines</a></li>
          <li class="active"><a href="../routines.dtype.html" accesskey="U">Data type routines</a></li> 
    </ul>
              
              
    <ul class="nav nav-pills pull-right">
      <li class="active">
        <a href="../../genindex.html" title="General Index"
           accesskey="I">index</a>
      </li>
      <li class="active">
        <a href="numpy.issctype.html" title="numpy.issctype"
           accesskey="N">next</a>
      </li>
      <li class="active">
        <a href="numpy.iinfo.html" title="numpy.iinfo"
           accesskey="P">previous</a>
      </li>
    </ul>
              
	    </div>
	  </div>
	</div>
        

	<div class="row-fluid">
      <div class="spc-rightsidebar span3">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="numpy.iinfo.html"
                        title="previous chapter">numpy.iinfo</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="numpy.issctype.html"
                        title="next chapter">numpy.issctype</a></p>
<div id="searchbox" style="display: none" role="search">
  <h4>Quick search</h4>
    <div>
    <form class="search" action="../../search.html" method="get">
      <input type="text" style="width: inherit;" name="q" />
      <input type="submit" value="search" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
          <div class="span9">
            
        <div class="bodywrapper">
          <div class="body" id="spc-section-body">
            
  <div class="section" id="numpy-machar">
<h1>numpy.MachAr<a class="headerlink" href="#numpy-machar" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="numpy.MachAr">
<em class="property">class </em><code class="sig-prename descclassname">numpy.</code><code class="sig-name descname">MachAr</code><span class="sig-paren">(</span><em class="sig-param">float_conv=&lt;class 'float'&gt;</em>, <em class="sig-param">int_conv=&lt;class 'int'&gt;</em>, <em class="sig-param">float_to_float=&lt;class 'float'&gt;</em>, <em class="sig-param">float_to_str=&lt;function MachAr.&lt;lambda&gt;&gt;</em>, <em class="sig-param">title='Python floating point number'</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/numpy/numpy/blob/v1.18.1/numpy/__init__.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#numpy.MachAr" title="Permalink to this definition">¶</a></dt>
<dd><p>Diagnosing machine parameters.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>float_conv</strong><span class="classifier">function, optional</span></dt><dd><p>Function that converts an integer or integer array to a float
or float array. Default is <a class="reference external" href="https://docs.python.org/dev/library/functions.html#float" title="(in Python v3.9)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">float</span></code></a>.</p>
</dd>
<dt><strong>int_conv</strong><span class="classifier">function, optional</span></dt><dd><p>Function that converts a float or float array to an integer or
integer array. Default is <a class="reference external" href="https://docs.python.org/dev/library/functions.html#int" title="(in Python v3.9)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">int</span></code></a>.</p>
</dd>
<dt><strong>float_to_float</strong><span class="classifier">function, optional</span></dt><dd><p>Function that converts a float array to float. Default is <a class="reference external" href="https://docs.python.org/dev/library/functions.html#float" title="(in Python v3.9)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">float</span></code></a>.
Note that this does not seem to do anything useful in the current
implementation.</p>
</dd>
<dt><strong>float_to_str</strong><span class="classifier">function, optional</span></dt><dd><p>Function that converts a single float to a string. Default is
<code class="docutils literal notranslate"><span class="pre">lambda</span> <span class="pre">v:'%24.16e'</span> <span class="pre">%v</span></code>.</p>
</dd>
<dt><strong>title</strong><span class="classifier">str, optional</span></dt><dd><p>Title that is printed in the string representation of <a class="reference internal" href="#numpy.MachAr" title="numpy.MachAr"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MachAr</span></code></a>.</p>
</dd>
</dl>
</dd>
</dl>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<dl class="simple">
<dt><a class="reference internal" href="numpy.finfo.html#numpy.finfo" title="numpy.finfo"><code class="xref py py-obj docutils literal notranslate"><span class="pre">finfo</span></code></a></dt><dd><p>Machine limits for floating point types.</p>
</dd>
<dt><a class="reference internal" href="numpy.iinfo.html#numpy.iinfo" title="numpy.iinfo"><code class="xref py py-obj docutils literal notranslate"><span class="pre">iinfo</span></code></a></dt><dd><p>Machine limits for integer types.</p>
</dd>
</dl>
</div>
<p class="rubric">References</p>
<dl class="citation">
<dt class="label" id="re860718f5533-1"><span class="brackets">Re860718f5533-1</span></dt>
<dd><p>Press, Teukolsky, Vetterling and Flannery,
“Numerical Recipes in C++,” 2nd ed,
Cambridge University Press, 2002, p. 31.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Attributes</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>ibeta</strong><span class="classifier">int</span></dt><dd><p>Radix in which numbers are represented.</p>
</dd>
<dt><strong>it</strong><span class="classifier">int</span></dt><dd><p>Number of base-<em class="xref py py-obj">ibeta</em> digits in the floating point mantissa M.</p>
</dd>
<dt><strong>machep</strong><span class="classifier">int</span></dt><dd><p>Exponent of the smallest (most negative) power of <em class="xref py py-obj">ibeta</em> that,
added to 1.0, gives something different from 1.0</p>
</dd>
<dt><strong>eps</strong><span class="classifier">float</span></dt><dd><p>Floating-point number <code class="docutils literal notranslate"><span class="pre">beta**machep</span></code> (floating point precision)</p>
</dd>
<dt><strong>negep</strong><span class="classifier">int</span></dt><dd><p>Exponent of the smallest power of <em class="xref py py-obj">ibeta</em> that, subtracted
from 1.0, gives something different from 1.0.</p>
</dd>
<dt><strong>epsneg</strong><span class="classifier">float</span></dt><dd><p>Floating-point number <code class="docutils literal notranslate"><span class="pre">beta**negep</span></code>.</p>
</dd>
<dt><strong>iexp</strong><span class="classifier">int</span></dt><dd><p>Number of bits in the exponent (including its sign and bias).</p>
</dd>
<dt><strong>minexp</strong><span class="classifier">int</span></dt><dd><p>Smallest (most negative) power of <em class="xref py py-obj">ibeta</em> consistent with there
being no leading zeros in the mantissa.</p>
</dd>
<dt><strong>xmin</strong><span class="classifier">float</span></dt><dd><p>Floating point number <code class="docutils literal notranslate"><span class="pre">beta**minexp</span></code> (the smallest [in
magnitude] usable floating value).</p>
</dd>
<dt><strong>maxexp</strong><span class="classifier">int</span></dt><dd><p>Smallest (positive) power of <em class="xref py py-obj">ibeta</em> that causes overflow.</p>
</dd>
<dt><strong>xmax</strong><span class="classifier">float</span></dt><dd><p><code class="docutils literal notranslate"><span class="pre">(1-epsneg)</span> <span class="pre">*</span> <span class="pre">beta**maxexp</span></code> (the largest [in magnitude]
usable floating value).</p>
</dd>
<dt><strong>irnd</strong><span class="classifier">int</span></dt><dd><p>In <code class="docutils literal notranslate"><span class="pre">range(6)</span></code>, information on what kind of rounding is done
in addition, and on how underflow is handled.</p>
</dd>
<dt><strong>ngrd</strong><span class="classifier">int</span></dt><dd><p>Number of ‘guard digits’ used when truncating the product
of two mantissas to fit the representation.</p>
</dd>
<dt><strong>epsilon</strong><span class="classifier">float</span></dt><dd><p>Same as <em class="xref py py-obj">eps</em>.</p>
</dd>
<dt><strong>tiny</strong><span class="classifier">float</span></dt><dd><p>Same as <em class="xref py py-obj">xmin</em>.</p>
</dd>
<dt><strong>huge</strong><span class="classifier">float</span></dt><dd><p>Same as <em class="xref py py-obj">xmax</em>.</p>
</dd>
<dt><strong>precision</strong><span class="classifier">float</span></dt><dd><p><code class="docutils literal notranslate"><span class="pre">-</span> <span class="pre">int(-log10(eps))</span></code></p>
</dd>
<dt><strong>resolution</strong><span class="classifier">float</span></dt><dd><p><code class="docutils literal notranslate"><span class="pre">-</span> <span class="pre">10**(-precision)</span></code></p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

</div>


          </div>
        </div>
          </div>
        </div>
      </div>
    </div>

    <div class="container container-navbar-bottom">
      <div class="spc-navbar">
        
      </div>
    </div>
    <div class="container">
    <div class="footer">
    <div class="row-fluid">
    <ul class="inline pull-left">
      <li>
        &copy; Copyright 2008-2019, The SciPy community.
      </li>
      <li>
      Last updated on Feb 20, 2020.
      </li>
      <li>
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.4.2.
      </li>
    </ul>
    </div>
    </div>
    </div>
  </body>
</html>